package com.grad.why.studentsystem.mapper;

import com.grad.why.studentsystem.domain.CourseArrange;
import com.grad.why.studentsystem.domain.CourseArrangeExample;
import com.grad.why.studentsystem.domain.current.CurrentCourseArrangeInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CourseArrangeMapper {
    int countByExample(CourseArrangeExample example);

    int deleteByExample(CourseArrangeExample example);

    int deleteByPrimaryKey(Integer coursearrangeid);

    int insert(CourseArrange record);

    int insertSelective(CourseArrange record);

    List<CourseArrange> selectByExample(CourseArrangeExample example);

    CourseArrange selectByPrimaryKey(Integer coursearrangeid);

    int updateByExampleSelective(@Param("record") CourseArrange record, @Param("example") CourseArrangeExample example);

    int updateByExample(@Param("record") CourseArrange record, @Param("example") CourseArrangeExample example);

    int updateByPrimaryKeySelective(CourseArrange record);

    int updateByPrimaryKey(CourseArrange record);

    List<CurrentCourseArrangeInfo> getCourseArrangeInfoList(@Param("offset") int offset,@Param("limit") int limit,@Param("search") String search);


    long getCourseArrangeInfoListLength(@Param("search") String search);

    List<CurrentCourseArrangeInfo> getCourseArrangeInfoByCid(@Param("cid") Integer cid);

    int getMaxId();

    Integer getClassRoomIdByCourseArrangeId(@Param("coursearrangeid") int coursearrangeid);

    int getCourseIdByCourseaArrangeId(@Param("coursearrangeid") int coursearrangeid);
}